﻿<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>修改密码</title>   
    <link href="@RS.Environment.ConfigurationHelper.GetAppSettings("VirtualUrl")/Resource/css/style.css" rel="stylesheet" />
</head>
<body>
    <div class="login_bg">
        <div class="reset_box center">
            <div class="reset_content">
                <input type="text" id="ln" class="input-index mt-128" placeholder="账号" required>
                <input type="password" id="pw" class="input-index mt-21" placeholder="旧密码" required>
                <input type="password" id="npw" class="input-index mt-21" placeholder="新密码" required>
                <input type="password" id="npw2" class="input-index mt-21" placeholder="确认密码" required>
                <input type="button" class="login mt-80" value="确认修改" id="submit_b">
            </div>
        </div>
        <div class="footer">
            @("@湖北省水利水电规划勘测设计院启梦智慧平台版权所有")
        </div>
    </div>

    <script src="@RS.Environment.ConfigurationHelper.GetAppSettings("VirtualUrl")/Resource/vendor/jquery/jquery.min.js"></script>
    <script>
        $("#submit_b").click(function ()
        {

            $("#submit_b").attr("disabled", "disabled");

            $.ajax({
                url: "@RS.Environment.ConfigurationHelper.GetAppSettings("VirtualUrl")" + "/Home/PwChange",
                data: { "ln": $("#ln").val(), "pw": $("#pw").val(), "n_p": $("#npw").val(), "n_p2": $("#npw2").val() },
                dataType: "json",
                type:"post",
                success: function (data)
                {
                    if (!data.IsError)
                    {
                        alert("修改成功");

                        location = "@RS.Environment.ConfigurationHelper.GetAppSettings("VirtualUrl")" + "/Home/Index";
                    }
                    else
                    {

                        alert(data.Message);

                        $("#submit_b").removeAttr("disabled");


                    }

                }
            });
        });
    </script>
</body>
</html>